<?php
class ShowTables {

	function getTables($url, $user, $pass, $db) {
		$like = "summary%";
		$field = "Tables_in_" .$db ;
		$where = " where " . $field . " like " . "'$like'";

		$link = mysql_connect($url,$user,$pass);
		$sdb = mysql_select_db($db,$link);

		// tbl1
		$sql = "show tables " . $where;
		echo $sql;
		$result = mysql_query($sql, $link);

		$rows = mysql_num_rows($result);
		$tbList = array();
		while ($row = mysql_fetch_assoc($result)) {
			$tbList[] = $row[$field];
		}
		mysql_free_result($result);
		mysql_close($link);

		return $tbList;
	}

}
